#ifndef DRAWCHART_H
#define DRAWCHART_H

#include <QtCore>
#include <QtGui>

class DrawChart
{
public:
    DrawChart();

public slots:
    void drawLineChart(QString title, QString line_name);
    void drawPieChart(QString title);

    void inputLineChart(int yNum);
//    void inputPieChart(QString name/*,QColor color*/, float Percentage);
    void inputPieChart(QString name,Qt::GlobalColor color, float percentage);
    void inputClear();

    void saveChart();

private:
    QList<qreal> line_y ;
    QList<qreal> pie_percent ;
    QList<QString> pie_name ;
    QList<Qt::GlobalColor> pie_color ;

    qreal findMax();
    qreal findMin();

signals:
    void drawChartFinish(QString path);
};

#endif // DRAWCHART_H
